#ifndef XGE_XDIR_H_
#define XGE_XDIR_H_
#include "xge_common_config.h"
#include "xarchive.h"
#include "xfile.h"
#include "xallocator.h"
namespace xge {
  // Enumeration function , we should enumeration all the file located in this archive 
  class Dir: public Allocator {
  public:

    enum{
      TYPE_FILE ,
      TYPE_ARCHIVE
    };
    // move this dir iterator to the next file located in this file
    virtual void Next() = 0;
    // testing is there existed a next element
    virtual bool HasNext() const =0;
    // get  this type iterator to acquire the file_type
    virtual int Type() =0;
    // get  the handler if it is a file
    virtual FilePtr File() = 0;
    // get the handler if it is a archive
    virtual ArchivePtr Archive() =0;
    // get the name of this file or archive
    virtual const String& name () =0;
    // virtual dtor
    virtual ~Dir() {}
  };
  

}// namespace xge
#endif // XGE_XDIR_H_